package com.shipxpress;

import java.util.Map;

import com.shipxpress.register.domain.User;
import com.shipxpress.register.util.UserList;

public class SessionManager {

    public static void setUserList(Map session, UserList userList) {
        session.put("userList", userList);
    }

    public static UserList getSessionUserList(Map session) {
        UserList userList = (UserList) session.get("userList");
        if (userList == null) {
            userList = new UserList();
        }
        return userList;
    }

    public static void setRecentUser(Map session, User user) {
        session.put("user", user);
    }
}
